<template lang="pug">
	.new-info-wrap
		.more-item-wrap
			.top-box
				.title 最新资讯
				.more
					span 更多
					i
			.slot-wrap
				.news-item(v-for="(item,index) in newsList" :key="index")
					.img-box
						img(:src="item.news_picture")
					.text-box
						.title {{item.notice_title}}
						.info-box
							.tag 药品
							.time {{item.notice_date_start}}
</template>
<script>
export default {
	data() {
		return {
			newsList: []
		}
	},
	computed: {},
	mounted() {
		this.getNewsInfo()
	},
	onPullDownRefresh() {},
	onReachBottom() {},
	methods: {
		getNewsInfo() {
			this.api.jtApi
				.getNewsInfo({
					is_show_index: 1,
					page_size: 3
				})
				.then(data => {
					if (data.ret_code === '0') {
						this.newsList = data.notices.notice
					} else {
					}
				})
				.catch(() => {})
		}
	},
	components: {}
}
</script>

<style lang="stylus" scoped>
	.new-info-wrap
		margin-top mainMargin
		.more-item-wrap
			padding mainPadding
			background-color white
			.top-box
				display flex
				justify-content space-between
				align-items center
				.title
					font-size 40px
					line-height 56px
					color blackFontColor
				.more
					color rightArrowColor
					font-size 28px
					line-height 40px
					display flex
					align-items center
					i
						margin-left 6px
						width 16px
						height 24px
						centerBackground("../assets/image/common/arrow_right_grey.png")
			.slot-wrap
				margin-top 20px
				.news-item
					margin-top 40px
					width 100%
					shadowBox()
					display flex
					justify-content flex-end
					box-sizing border-box
					height 190px
					position relative
					.img-box
						position absolute
						width 240px
						height 180px
						border-radius 8px
						overflow hidden
						top -20px
						left 20px
						img
							width 100%
							height 100%
					.text-box
						padding mainPadding
						width 430px
						box-sizing border-box
						.title
							color blackFontColor
							font-size 30px
							line-height 44px
						.info-box
							margin-top 10px
							display flex
							justify-content space-between
							align-items center
							.tag
								display inline-block
								background:rgba(38,147,255,1);
								border-radius:16px;
								font-size 22px
								line-height 32px
								color white
								padding 0 10px
							.time
								font-size 24px
								line-height 34px
								color grayFontColor
</style>
